package com.bookbuf.app;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.bookbuf.api.apis.MayoAPI;
import com.ipudong.core.network.RestServiceFactory;

import org.json.JSONArray;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void onClickLogin(View view) {

        new Thread() {
            @Override
            public void run() {
                super.run();
                MayoAPI api = RestServiceFactory.getService("", MayoAPI.class);
                JSONArray array = new JSONArray();
                array.put("注射用硫酸镁");
                array.put("硫酸阿托品注射液");
                array.put("阿昔洛韦片");
                array.put("齐多夫定片");
                api.interaction(1469705798345l, "UTF-8", array);
            }
        }.start();

    }

}
